using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities;

namespace Acme.BookStore.Domain.Entities
{
    [Table("KehuTable", Schema = "public")]
    public class Kehu : Entity<string>
    {
        [Key]
        [Column("code")]
        public override string Id { get; protected set; }

        [Required]
        [Column("name")]
        [StringLength(100)]
        public string Name { get; set; }

        [Column("address")]
        public string Address { get; set; }

        [Column("contact_person")]
        [StringLength(50)]
        public string ContactPerson { get; set; }

        [Column("phone")]
        [StringLength(20)]
        public string Phone { get; set; }

        [Column("mobile")]
        [StringLength(20)]
        public string Mobile { get; set; }

        [Column("contact1")]
        [StringLength(50)]
        public string Contact1 { get; set; }

        [Column("enterprise_attribute")]
        [StringLength(50)]
        public string EnterpriseAttribute { get; set; }

        [Column("contract_number")]
        [StringLength(50)]
        public string ContractNumber { get; set; }

        [Column("phone1")]
        [StringLength(20)]
        public string Phone1 { get; set; }

        [Column("email_address")]
        [StringLength(100)]
        public string EmailAddress { get; set; }

        [Column("remarks")]
        public string Remarks { get; set; }
        
        protected Kehu()
        {
            // 给 ORM 用的空构造函数
        }
        
        public Kehu(string id)
        {
            Id = id;
        }
    }
} 